package com.autumn.zero.workflow.application.dto.user.task;

import java.util.Date;

import com.autumn.util.excel.annotations.ExcelColumn;
import com.autumn.util.excel.annotations.ExcelWorkbook;
import com.autumn.zero.workflow.constants.ProcessTaskConstants;

/**
 * 工作流用户任务完成输出
 * 
 * @author 杨昌国 2019-02-20 17:49:05
 */
@ExcelWorkbook(exportTitle = "已办任务")
public class WorkflowUserTaskCompleteOutput extends WorkflowUserTaskDto {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1849111709904107998L;

	/**
	 * 用户名称
	 */
	private String userName;

	/**
	 * 完成时间
	 */
	@ExcelColumn(order = 10, friendlyName = "完成时间", width = 120)
	private Date completeTime;

	/**
	 * 任务结果 {@link com.autumn.zero.workflow.constants.ProcessTaskConstants}
	 */	
	private Integer taskResult;

	/**
	 * 任务意见
	 */
	@ExcelColumn(order = 11, friendlyName = "处理意见", width = 250)
	private String taskOpinion;

	/**
	 * 获取用户名称
	 * 
	 * @return
	 */
	public String getUserName() {
		return userName;
	}

	/**
	 * 设置用户名称
	 * 
	 * @param userName
	 */
	public void setUserName(String userName) {
		this.userName = userName;
	}

	/**
	 * 获取完成时间
	 * 
	 * @return
	 */
	public Date getCompleteTime() {
		return completeTime;
	}

	/**
	 * 设置完成时间
	 * 
	 * @param completeTime 完成时间
	 */
	public void setCompleteTime(Date completeTime) {
		this.completeTime = completeTime;
	}

	/**
	 * 获取任务结果
	 * 
	 * @return {@link com.autumn.zero.workflow.constants.ProcessTaskConstants}
	 */
	public Integer getTaskResult() {
		return taskResult;
	}

	/**
	 * 设置任务结果
	 * 
	 * @param taskResult 任务结果
	 *                   {@link com.autumn.zero.workflow.constants.ProcessTaskConstants}
	 */
	public void setTaskResult(Integer taskResult) {
		this.taskResult = taskResult;
	}

	/**
	 * 获取任务结果名称
	 * 
	 * @return
	 */
	@ExcelColumn(order = 12, friendlyName = "处理结果", width = 80)
	public String getTaskResultName() {
		return ProcessTaskConstants.getName(this.getTaskResult());
	}

	/**
	 * 获取任务意见
	 * 
	 * @return
	 */
	public String getTaskOpinion() {
		return taskOpinion;
	}

	/**
	 * 设置任务意见
	 * 
	 * @param taskOpinion
	 */
	public void setTaskOpinion(String taskOpinion) {
		this.taskOpinion = taskOpinion;
	}
}
